package com.pf.controller;

import com.pf.dto.AuditTaskDO;
import com.pf.dto.ResultResp;
import com.pf.service.AuditTaskService;
import com.pf.utils.ResultRespUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author PanFei
 * @version 1.0.0
 * @createTime 2022/11/27 16:03
 */
@RestController
@RequestMapping("/auditTask")
public class AuditTaskController {

    @Autowired
    private AuditTaskService auditTaskService;

    /**
     * 模拟校验excel数据
     *
     * @return
     */
    @GetMapping("/validate/excel")
    public ResultResp validateExcel() {
        List<AuditTaskDO> taskList = auditTaskService.validateExcelData();
        return ResultRespUtils.success(taskList);
    }
}
